using UnityEngine;

namespace UbiArt.ITF {
	[Games(GameFlags.All)]
	public partial class StickToPolylinePhysComponent_Template : PhysComponent_Template {
		public float physFriction;
		public float physAirFriction;
		public Angle physUnstickMinAngle;
		public Angle physUnstickMaxAngle;
		public float physUnstickMinAngleSpeed;
		public float physUnstickMaxAngleSpeed;
		public float physUnstickMinFriction;
		public float physUnstickMinForceExternal;
		public float physAngularSpeedMinLinear;
		public float physAngularSpeedMaxLinear;
		public Angle physAngularSpeedMinAngular;
		public Angle physAngularSpeedMaxAngular;
		public float physAngularAirMultiplier;
		public Angle physGroundAngularSpeedMultiplierMinAngle;
		public Angle physGroundAngularSpeedMultiplierMaxAngle;
		public float physGroundAngularSpeedMultiplierMinMult;
		public float physGroundAngularSpeedMultiplierMaxMult;
		public Angle physTransferSpeedLossMinAngle;
		public Angle physTransferSpeedLossMaxAngle;
		public float physTransferSpeedLossMinLoss;
		public float physTransferSpeedLossMaxLoss;
		public Angle physSpeedLossLandEdgeMinAngle;
		public Angle physSpeedLossLandEdgeMaxAngle;
		public float physSpeedLossLandMinimum;
		public float physSpeedLossLandMaximum;
		public float physTorqueRotationMultiplier;
		public float physMinSpeedStickToWall;
		public bool physTreatCornerCase;
		public float physCornerCaseDisableDelay;
		public bool physTreatMovingPolylines;
		public bool physTreatSelfCollision;
		public Curve2D physCurveSlideAndAngle;
		public bool displayPhysCurveSlideAndAngle;
		public float physUnstickToOtherMaxDistance;
		public float windForceBlendCoef;
		public float secondaryCollisionCheckRadius;
		public Vec2d secondaryCollisionCheckPos;
		protected override void SerializeImpl(CSerializerObject s) {
			base.SerializeImpl(s);
			if (Settings.s.game == Settings.Game.RJR || Settings.s.game == Settings.Game.RO) {
				physFriction = s.Serialize<float>(physFriction, name: "physFriction");
				physAirFriction = s.Serialize<float>(physAirFriction, name: "physAirFriction");
				physUnstickMinAngle = s.SerializeObject<Angle>(physUnstickMinAngle, name: "physUnstickMinAngle");
				physUnstickMaxAngle = s.SerializeObject<Angle>(physUnstickMaxAngle, name: "physUnstickMaxAngle");
				physUnstickMinAngleSpeed = s.Serialize<float>(physUnstickMinAngleSpeed, name: "physUnstickMinAngleSpeed");
				physUnstickMaxAngleSpeed = s.Serialize<float>(physUnstickMaxAngleSpeed, name: "physUnstickMaxAngleSpeed");
				physUnstickMinFriction = s.Serialize<float>(physUnstickMinFriction, name: "physUnstickMinFriction");
				physUnstickMinForceExternal = s.Serialize<float>(physUnstickMinForceExternal, name: "physUnstickMinForceExternal");
				physAngularSpeedMinLinear = s.Serialize<float>(physAngularSpeedMinLinear, name: "physAngularSpeedMinLinear");
				physAngularSpeedMaxLinear = s.Serialize<float>(physAngularSpeedMaxLinear, name: "physAngularSpeedMaxLinear");
				physAngularSpeedMinAngular = s.SerializeObject<Angle>(physAngularSpeedMinAngular, name: "physAngularSpeedMinAngular");
				physAngularSpeedMaxAngular = s.SerializeObject<Angle>(physAngularSpeedMaxAngular, name: "physAngularSpeedMaxAngular");
				physAngularAirMultiplier = s.Serialize<float>(physAngularAirMultiplier, name: "physAngularAirMultiplier");
				physGroundAngularSpeedMultiplierMinAngle = s.SerializeObject<Angle>(physGroundAngularSpeedMultiplierMinAngle, name: "physGroundAngularSpeedMultiplierMinAngle");
				physGroundAngularSpeedMultiplierMaxAngle = s.SerializeObject<Angle>(physGroundAngularSpeedMultiplierMaxAngle, name: "physGroundAngularSpeedMultiplierMaxAngle");
				physGroundAngularSpeedMultiplierMinMult = s.Serialize<float>(physGroundAngularSpeedMultiplierMinMult, name: "physGroundAngularSpeedMultiplierMinMult");
				physGroundAngularSpeedMultiplierMaxMult = s.Serialize<float>(physGroundAngularSpeedMultiplierMaxMult, name: "physGroundAngularSpeedMultiplierMaxMult");
				physTransferSpeedLossMinAngle = s.SerializeObject<Angle>(physTransferSpeedLossMinAngle, name: "physTransferSpeedLossMinAngle");
				physTransferSpeedLossMaxAngle = s.SerializeObject<Angle>(physTransferSpeedLossMaxAngle, name: "physTransferSpeedLossMaxAngle");
				physTransferSpeedLossMinLoss = s.Serialize<float>(physTransferSpeedLossMinLoss, name: "physTransferSpeedLossMinLoss");
				physTransferSpeedLossMaxLoss = s.Serialize<float>(physTransferSpeedLossMaxLoss, name: "physTransferSpeedLossMaxLoss");
				physSpeedLossLandEdgeMinAngle = s.SerializeObject<Angle>(physSpeedLossLandEdgeMinAngle, name: "physSpeedLossLandEdgeMinAngle");
				physSpeedLossLandEdgeMaxAngle = s.SerializeObject<Angle>(physSpeedLossLandEdgeMaxAngle, name: "physSpeedLossLandEdgeMaxAngle");
				physSpeedLossLandMinimum = s.Serialize<float>(physSpeedLossLandMinimum, name: "physSpeedLossLandMinimum");
				physSpeedLossLandMaximum = s.Serialize<float>(physSpeedLossLandMaximum, name: "physSpeedLossLandMaximum");
				physTorqueRotationMultiplier = s.Serialize<float>(physTorqueRotationMultiplier, name: "physTorqueRotationMultiplier");
				physMinSpeedStickToWall = s.Serialize<float>(physMinSpeedStickToWall, name: "physMinSpeedStickToWall");
				physTreatCornerCase = s.Serialize<bool>(physTreatCornerCase, name: "physTreatCornerCase");
				physCornerCaseDisableDelay = s.Serialize<float>(physCornerCaseDisableDelay, name: "physCornerCaseDisableDelay");
				physTreatMovingPolylines = s.Serialize<bool>(physTreatMovingPolylines, name: "physTreatMovingPolylines");
			} else if (Settings.s.game == Settings.Game.RFR || Settings.s.game == Settings.Game.RL) {
				physFriction = s.Serialize<float>(physFriction, name: "physFriction");
				physAirFriction = s.Serialize<float>(physAirFriction, name: "physAirFriction");
				physUnstickMinAngle = s.SerializeObject<Angle>(physUnstickMinAngle, name: "physUnstickMinAngle");
				physUnstickMaxAngle = s.SerializeObject<Angle>(physUnstickMaxAngle, name: "physUnstickMaxAngle");
				physUnstickMinAngleSpeed = s.Serialize<float>(physUnstickMinAngleSpeed, name: "physUnstickMinAngleSpeed");
				physUnstickMaxAngleSpeed = s.Serialize<float>(physUnstickMaxAngleSpeed, name: "physUnstickMaxAngleSpeed");
				physUnstickMinFriction = s.Serialize<float>(physUnstickMinFriction, name: "physUnstickMinFriction");
				physUnstickMinForceExternal = s.Serialize<float>(physUnstickMinForceExternal, name: "physUnstickMinForceExternal");
				physAngularSpeedMinLinear = s.Serialize<float>(physAngularSpeedMinLinear, name: "physAngularSpeedMinLinear");
				physAngularSpeedMaxLinear = s.Serialize<float>(physAngularSpeedMaxLinear, name: "physAngularSpeedMaxLinear");
				physAngularSpeedMinAngular = s.SerializeObject<Angle>(physAngularSpeedMinAngular, name: "physAngularSpeedMinAngular");
				physAngularSpeedMaxAngular = s.SerializeObject<Angle>(physAngularSpeedMaxAngular, name: "physAngularSpeedMaxAngular");
				physAngularAirMultiplier = s.Serialize<float>(physAngularAirMultiplier, name: "physAngularAirMultiplier");
				physGroundAngularSpeedMultiplierMinAngle = s.SerializeObject<Angle>(physGroundAngularSpeedMultiplierMinAngle, name: "physGroundAngularSpeedMultiplierMinAngle");
				physGroundAngularSpeedMultiplierMaxAngle = s.SerializeObject<Angle>(physGroundAngularSpeedMultiplierMaxAngle, name: "physGroundAngularSpeedMultiplierMaxAngle");
				physGroundAngularSpeedMultiplierMinMult = s.Serialize<float>(physGroundAngularSpeedMultiplierMinMult, name: "physGroundAngularSpeedMultiplierMinMult");
				physGroundAngularSpeedMultiplierMaxMult = s.Serialize<float>(physGroundAngularSpeedMultiplierMaxMult, name: "physGroundAngularSpeedMultiplierMaxMult");
				physTransferSpeedLossMinAngle = s.SerializeObject<Angle>(physTransferSpeedLossMinAngle, name: "physTransferSpeedLossMinAngle");
				physTransferSpeedLossMaxAngle = s.SerializeObject<Angle>(physTransferSpeedLossMaxAngle, name: "physTransferSpeedLossMaxAngle");
				physTransferSpeedLossMinLoss = s.Serialize<float>(physTransferSpeedLossMinLoss, name: "physTransferSpeedLossMinLoss");
				physTransferSpeedLossMaxLoss = s.Serialize<float>(physTransferSpeedLossMaxLoss, name: "physTransferSpeedLossMaxLoss");
				physSpeedLossLandEdgeMinAngle = s.SerializeObject<Angle>(physSpeedLossLandEdgeMinAngle, name: "physSpeedLossLandEdgeMinAngle");
				physSpeedLossLandEdgeMaxAngle = s.SerializeObject<Angle>(physSpeedLossLandEdgeMaxAngle, name: "physSpeedLossLandEdgeMaxAngle");
				physSpeedLossLandMinimum = s.Serialize<float>(physSpeedLossLandMinimum, name: "physSpeedLossLandMinimum");
				physSpeedLossLandMaximum = s.Serialize<float>(physSpeedLossLandMaximum, name: "physSpeedLossLandMaximum");
				physTorqueRotationMultiplier = s.Serialize<float>(physTorqueRotationMultiplier, name: "physTorqueRotationMultiplier");
				physMinSpeedStickToWall = s.Serialize<float>(physMinSpeedStickToWall, name: "physMinSpeedStickToWall");
				physTreatCornerCase = s.Serialize<bool>(physTreatCornerCase, name: "physTreatCornerCase");
				physCornerCaseDisableDelay = s.Serialize<float>(physCornerCaseDisableDelay, name: "physCornerCaseDisableDelay");
				physTreatMovingPolylines = s.Serialize<bool>(physTreatMovingPolylines, name: "physTreatMovingPolylines");
				physTreatSelfCollision = s.Serialize<bool>(physTreatSelfCollision, name: "physTreatSelfCollision");
			} else if (Settings.s.game == Settings.Game.COL) {
				physFriction = s.Serialize<float>(physFriction, name: "physFriction");
				physAirFriction = s.Serialize<float>(physAirFriction, name: "physAirFriction");
				physUnstickMinAngle = s.SerializeObject<Angle>(physUnstickMinAngle, name: "physUnstickMinAngle");
				physUnstickMaxAngle = s.SerializeObject<Angle>(physUnstickMaxAngle, name: "physUnstickMaxAngle");
				physUnstickMinAngleSpeed = s.Serialize<float>(physUnstickMinAngleSpeed, name: "physUnstickMinAngleSpeed");
				physUnstickMaxAngleSpeed = s.Serialize<float>(physUnstickMaxAngleSpeed, name: "physUnstickMaxAngleSpeed");
				physUnstickMinFriction = s.Serialize<float>(physUnstickMinFriction, name: "physUnstickMinFriction");
				physUnstickMinForceExternal = s.Serialize<float>(physUnstickMinForceExternal, name: "physUnstickMinForceExternal");
				physUnstickToOtherMaxDistance = s.Serialize<float>(physUnstickToOtherMaxDistance, name: "physUnstickToOtherMaxDistance");
				physAngularSpeedMinLinear = s.Serialize<float>(physAngularSpeedMinLinear, name: "physAngularSpeedMinLinear");
				physAngularSpeedMaxLinear = s.Serialize<float>(physAngularSpeedMaxLinear, name: "physAngularSpeedMaxLinear");
				physAngularSpeedMinAngular = s.SerializeObject<Angle>(physAngularSpeedMinAngular, name: "physAngularSpeedMinAngular");
				physAngularSpeedMaxAngular = s.SerializeObject<Angle>(physAngularSpeedMaxAngular, name: "physAngularSpeedMaxAngular");
				physAngularAirMultiplier = s.Serialize<float>(physAngularAirMultiplier, name: "physAngularAirMultiplier");
				physGroundAngularSpeedMultiplierMinAngle = s.SerializeObject<Angle>(physGroundAngularSpeedMultiplierMinAngle, name: "physGroundAngularSpeedMultiplierMinAngle");
				physGroundAngularSpeedMultiplierMaxAngle = s.SerializeObject<Angle>(physGroundAngularSpeedMultiplierMaxAngle, name: "physGroundAngularSpeedMultiplierMaxAngle");
				physGroundAngularSpeedMultiplierMinMult = s.Serialize<float>(physGroundAngularSpeedMultiplierMinMult, name: "physGroundAngularSpeedMultiplierMinMult");
				physGroundAngularSpeedMultiplierMaxMult = s.Serialize<float>(physGroundAngularSpeedMultiplierMaxMult, name: "physGroundAngularSpeedMultiplierMaxMult");
				physTransferSpeedLossMinAngle = s.SerializeObject<Angle>(physTransferSpeedLossMinAngle, name: "physTransferSpeedLossMinAngle");
				physTransferSpeedLossMaxAngle = s.SerializeObject<Angle>(physTransferSpeedLossMaxAngle, name: "physTransferSpeedLossMaxAngle");
				physTransferSpeedLossMinLoss = s.Serialize<float>(physTransferSpeedLossMinLoss, name: "physTransferSpeedLossMinLoss");
				physTransferSpeedLossMaxLoss = s.Serialize<float>(physTransferSpeedLossMaxLoss, name: "physTransferSpeedLossMaxLoss");
				physSpeedLossLandEdgeMinAngle = s.SerializeObject<Angle>(physSpeedLossLandEdgeMinAngle, name: "physSpeedLossLandEdgeMinAngle");
				physSpeedLossLandEdgeMaxAngle = s.SerializeObject<Angle>(physSpeedLossLandEdgeMaxAngle, name: "physSpeedLossLandEdgeMaxAngle");
				physSpeedLossLandMinimum = s.Serialize<float>(physSpeedLossLandMinimum, name: "physSpeedLossLandMinimum");
				physSpeedLossLandMaximum = s.Serialize<float>(physSpeedLossLandMaximum, name: "physSpeedLossLandMaximum");
				physTorqueRotationMultiplier = s.Serialize<float>(physTorqueRotationMultiplier, name: "physTorqueRotationMultiplier");
				physMinSpeedStickToWall = s.Serialize<float>(physMinSpeedStickToWall, name: "physMinSpeedStickToWall");
				physTreatCornerCase = s.Serialize<bool>(physTreatCornerCase, name: "physTreatCornerCase");
				physCornerCaseDisableDelay = s.Serialize<float>(physCornerCaseDisableDelay, name: "physCornerCaseDisableDelay");
				physTreatMovingPolylines = s.Serialize<bool>(physTreatMovingPolylines, name: "physTreatMovingPolylines");
				physTreatSelfCollision = s.Serialize<bool>(physTreatSelfCollision, name: "physTreatSelfCollision");
				windForceBlendCoef = s.Serialize<float>(windForceBlendCoef, name: "windForceBlendCoef");
				secondaryCollisionCheckRadius = s.Serialize<float>(secondaryCollisionCheckRadius, name: "secondaryCollisionCheckRadius");
				secondaryCollisionCheckPos = s.SerializeObject<Vec2d>(secondaryCollisionCheckPos, name: "secondaryCollisionCheckPos");
			} else {
				physFriction = s.Serialize<float>(physFriction, name: "physFriction");
				physAirFriction = s.Serialize<float>(physAirFriction, name: "physAirFriction");
				physUnstickMinAngle = s.SerializeObject<Angle>(physUnstickMinAngle, name: "physUnstickMinAngle");
				physUnstickMaxAngle = s.SerializeObject<Angle>(physUnstickMaxAngle, name: "physUnstickMaxAngle");
				physUnstickMinAngleSpeed = s.Serialize<float>(physUnstickMinAngleSpeed, name: "physUnstickMinAngleSpeed");
				physUnstickMaxAngleSpeed = s.Serialize<float>(physUnstickMaxAngleSpeed, name: "physUnstickMaxAngleSpeed");
				physUnstickMinFriction = s.Serialize<float>(physUnstickMinFriction, name: "physUnstickMinFriction");
				physUnstickMinForceExternal = s.Serialize<float>(physUnstickMinForceExternal, name: "physUnstickMinForceExternal");
				physAngularSpeedMinLinear = s.Serialize<float>(physAngularSpeedMinLinear, name: "physAngularSpeedMinLinear");
				physAngularSpeedMaxLinear = s.Serialize<float>(physAngularSpeedMaxLinear, name: "physAngularSpeedMaxLinear");
				physAngularSpeedMinAngular = s.SerializeObject<Angle>(physAngularSpeedMinAngular, name: "physAngularSpeedMinAngular");
				physAngularSpeedMaxAngular = s.SerializeObject<Angle>(physAngularSpeedMaxAngular, name: "physAngularSpeedMaxAngular");
				physAngularAirMultiplier = s.Serialize<float>(physAngularAirMultiplier, name: "physAngularAirMultiplier");
				physGroundAngularSpeedMultiplierMinAngle = s.SerializeObject<Angle>(physGroundAngularSpeedMultiplierMinAngle, name: "physGroundAngularSpeedMultiplierMinAngle");
				physGroundAngularSpeedMultiplierMaxAngle = s.SerializeObject<Angle>(physGroundAngularSpeedMultiplierMaxAngle, name: "physGroundAngularSpeedMultiplierMaxAngle");
				physGroundAngularSpeedMultiplierMinMult = s.Serialize<float>(physGroundAngularSpeedMultiplierMinMult, name: "physGroundAngularSpeedMultiplierMinMult");
				physGroundAngularSpeedMultiplierMaxMult = s.Serialize<float>(physGroundAngularSpeedMultiplierMaxMult, name: "physGroundAngularSpeedMultiplierMaxMult");
				physTransferSpeedLossMinAngle = s.SerializeObject<Angle>(physTransferSpeedLossMinAngle, name: "physTransferSpeedLossMinAngle");
				physTransferSpeedLossMaxAngle = s.SerializeObject<Angle>(physTransferSpeedLossMaxAngle, name: "physTransferSpeedLossMaxAngle");
				physTransferSpeedLossMinLoss = s.Serialize<float>(physTransferSpeedLossMinLoss, name: "physTransferSpeedLossMinLoss");
				physTransferSpeedLossMaxLoss = s.Serialize<float>(physTransferSpeedLossMaxLoss, name: "physTransferSpeedLossMaxLoss");
				physSpeedLossLandEdgeMinAngle = s.SerializeObject<Angle>(physSpeedLossLandEdgeMinAngle, name: "physSpeedLossLandEdgeMinAngle");
				physSpeedLossLandEdgeMaxAngle = s.SerializeObject<Angle>(physSpeedLossLandEdgeMaxAngle, name: "physSpeedLossLandEdgeMaxAngle");
				physSpeedLossLandMinimum = s.Serialize<float>(physSpeedLossLandMinimum, name: "physSpeedLossLandMinimum");
				physSpeedLossLandMaximum = s.Serialize<float>(physSpeedLossLandMaximum, name: "physSpeedLossLandMaximum");
				physTorqueRotationMultiplier = s.Serialize<float>(physTorqueRotationMultiplier, name: "physTorqueRotationMultiplier");
				physMinSpeedStickToWall = s.Serialize<float>(physMinSpeedStickToWall, name: "physMinSpeedStickToWall");
				physTreatCornerCase = s.Serialize<bool>(physTreatCornerCase, name: "physTreatCornerCase");
				physCornerCaseDisableDelay = s.Serialize<float>(physCornerCaseDisableDelay, name: "physCornerCaseDisableDelay");
				physTreatMovingPolylines = s.Serialize<bool>(physTreatMovingPolylines, name: "physTreatMovingPolylines");
				physTreatSelfCollision = s.Serialize<bool>(physTreatSelfCollision, name: "physTreatSelfCollision");
				physCurveSlideAndAngle = s.SerializeObject<Curve2D>(physCurveSlideAndAngle, name: "physCurveSlideAndAngle");
				displayPhysCurveSlideAndAngle = s.Serialize<bool>(displayPhysCurveSlideAndAngle, name: "displayPhysCurveSlideAndAngle");
				physRadius = s.Serialize<float>(physRadius, name: "physRadius");
				physWeight = s.Serialize<float>(physWeight, name: "physWeight");
				physWindMultiplier = s.Serialize<float>(physWindMultiplier, name: "physWindMultiplier");
				physWaterMultiplier = s.Serialize<float>(physWaterMultiplier, name: "physWaterMultiplier");
				physForce2Speed = s.Serialize<float>(physForce2Speed, name: "physForce2Speed");
				physWindSpeedLimit = s.Serialize<float>(physWindSpeedLimit, name: "physWindSpeedLimit");
				physWindScaleFactorWhenSpeedIsOpposite = s.Serialize<float>(physWindScaleFactorWhenSpeedIsOpposite, name: "physWindScaleFactorWhenSpeedIsOpposite");
				physFanForceMultiplier = s.Serialize<float>(physFanForceMultiplier, name: "physFanForceMultiplier");
				physWaterMinPerturbation = s.Serialize<float>(physWaterMinPerturbation, name: "physWaterMinPerturbation");
			}
		}
		public override uint? ClassCRC => 0xE85B6A29;
	}
}

